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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.z: F = None
        self.q: C = None
        self.s: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: D = None
        self.z: D = None
        self.q: D = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.z: F = None
        self.q: C = None
        self.s: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: D = None
        self.z: D = None
        self.q: D = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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