class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: F = None
        self.q: C = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.t: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: D = None
        self.x: G = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: F = None
        self.o: B = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: G = None
        self.u: A = None
        self.z: F = None
        self.x: A = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.txt = txt

d = A("d")
i = B("i")
c = C("c")
h = D("h")
e = E("e")
f = F("f")
j = G("j")
k = H("k")

d.x = h
d.r = f
d.q = c
d.t = e
d.w = i
i.s = j
i.x = c
i.t = c
i.w = e
c.o = e
c.v = h
c.w = h
c.x = j
c.z = j
h.z = f
h.v = f
h.o = i
h.t = k
e.s = j
e.w = j
e.u = d
e.x = d
e.y = d
e.z = f
e.v = i
f.o = d
j.t = f
j.z = d
k.y = c
k.s = d
assert f.o.q.w.v.o.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: F = None
        self.q: C = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.t: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: D = None
        self.x: G = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: F = None
        self.o: B = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: G = None
        self.u: A = None
        self.z: F = None
        self.x: A = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.txt = txt

d = A("d")
i = B("i")
c = C("c")
h = D("h")
e = E("e")
f = F("f")
j = G("j")
k = H("k")

d.x = h
d.r = f
d.q = c
d.t = e
d.w = i
i.s = j
i.x = c
i.t = c
i.w = e
c.o = e
c.v = h
c.w = h
c.x = j
c.z = j
h.z = f
h.v = f
h.o = i
h.t = k
e.s = j
e.w = j
e.u = d
e.x = d
e.y = d
e.z = f
e.v = i
f.o = d
j.t = f
j.z = d
k.y = c
k.s = d
assert f.o.q.w.v.o.x.o.txt == "i"