class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.y: B = None
        self.v: F = None
        self.p: C = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.p: E = None
        self.r: F = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: G = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.z: F = None
        self.o: F = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.p: E = None
        self.r: F = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: G = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.z: F = None
        self.o: F = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

f.x = d
f.z = g
f.y = c
f.v = b
f.p = i
f.r = e
c.z = j
c.x = g
c.p = d
c.r = b
c.y = b
c.v = b
i.o = f
i.q = g
i.u = g
i.x = a
j.s = k
j.v = e
j.u = c
d.r = a
d.o = b
d.y = k
d.t = g
b.z = d
g.x = a
g.q = a
g.z = b
g.o = b
g.p = d
a.x = d
a.z = g
a.q = j
a.s = f
e.s = k
e.v = j
e.u = c
k.x = d
k.z = g
k.y = c
k.v = b
k.p = i
k.r = j
assert i.u.x.z.z.z.o.z.y.v.z.txt == "d"