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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: C = None
        self.p: F = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: C = None
        self.p: F = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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