class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.q: C = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.z: H = None
        self.u: E = None
        self.r: E = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: E = None
        self.r: D = None
        self.s: D = None
        self.z: H = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.q: C = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.z: H = None
        self.u: E = None
        self.r: E = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: E = None
        self.r: D = None
        self.s: D = None
        self.z: H = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

e.r = f
e.y = l
e.s = d
f.u = l
f.s = a
f.t = a
f.q = m
g.u = b
g.z = d
g.y = d
g.s = d
g.q = a
g.x = m
g.w = e
b.z = g
b.r = m
b.o = a
b.x = a
b.w = d
k.s = a
k.z = a
k.q = l
k.u = c
k.r = c
k.w = g
k.o = d
l.p = c
l.w = c
l.r = b
l.s = b
l.z = a
l.x = f
l.y = g
d.x = g
d.t = c
a.x = b
m.u = b
m.z = d
m.y = d
m.s = d
m.q = a
m.x = g
m.w = e
c.s = a
c.z = a
c.q = l
c.u = k
c.r = k
c.w = m
c.o = d
assert c.o.t.w.x.z.x.y.txt == "d"