class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.t: F = None
        self.y: D = None
        self.s: D = None
        self.u: D = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
e = D("e")
k = E("k")
f = F("f")
d = F("d")
i = D("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.t: F = None
        self.y: D = None
        self.s: D = None
        self.u: D = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
e = D("e")
k = E("k")
f = F("f")
d = F("d")
i = D("i")

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