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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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