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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: A = None
        self.w: A = None
        self.q: G = None
        self.o: E = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: A = None
        self.w: A = None
        self.q: G = None
        self.o: E = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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

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