class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: A = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.z: F = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

g = A("g")
l = B("l")
k = C("k")
n = D("n")
i = E("i")
f = F("f")
h = B("h")
d = F("d")
b = D("b")
c = A("c")

g.w = k
g.y = c
g.o = h
g.q = n
l.o = c
l.r = d
l.q = k
l.t = n
l.u = i
l.p = g
k.v = i
k.w = i
k.t = g
k.z = f
k.y = h
n.r = b
n.w = g
n.y = d
i.o = h
f.x = i
f.z = i
f.w = i
f.q = c
f.v = h
h.o = c
h.r = f
h.q = k
h.t = n
h.u = i
h.p = g
d.x = i
d.z = i
d.w = i
d.q = g
d.v = h
b.r = n
b.w = g
b.y = f
c.w = k
c.y = g
c.o = l
c.q = n
assert l.t.y.x.o.o.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: A = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.z: F = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

g = A("g")
l = B("l")
k = C("k")
n = D("n")
i = E("i")
f = F("f")
h = B("h")
d = F("d")
b = D("b")
c = A("c")

g.w = k
g.y = c
g.o = h
g.q = n
l.o = c
l.r = d
l.q = k
l.t = n
l.u = i
l.p = g
k.v = i
k.w = i
k.t = g
k.z = f
k.y = h
n.r = b
n.w = g
n.y = d
i.o = h
f.x = i
f.z = i
f.w = i
f.q = c
f.v = h
h.o = c
h.r = f
h.q = k
h.t = n
h.u = i
h.p = g
d.x = i
d.z = i
d.w = i
d.q = g
d.v = h
b.r = n
b.w = g
b.y = f
c.w = k
c.y = g
c.o = l
c.q = n
assert l.t.y.x.o.o.o.r.txt == "d"