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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.y: D = None
        self.p: G = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: F = None
        self.t: A = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.y: D = None
        self.p: G = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: F = None
        self.t: A = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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