class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.r: G = None
        self.q: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

c = A("c")
b = B("b")
m = C("m")
i = D("i")
j = E("j")
e = F("e")
d = G("d")

c.v = b
c.y = d
c.r = d
c.q = m
c.z = i
b.t = i
b.o = i
b.y = c
b.x = c
b.p = j
m.u = j
m.t = e
m.z = e
m.v = b
i.y = m
i.z = m
i.s = j
i.u = d
i.v = e
j.w = e
j.o = c
e.u = b
e.r = b
e.w = i
e.z = i
e.v = i
e.t = m
e.q = m
d.w = j
d.x = j
d.y = j
d.u = i
assert i.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.r: G = None
        self.q: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

c = A("c")
b = B("b")
m = C("m")
i = D("i")
j = E("j")
e = F("e")
d = G("d")

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