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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: E = None
        self.w: C = None
        self.txt = txt

f = A("f")
g = B("g")
c = C("c")
h = D("h")
m = E("m")
e = F("e")
i = G("i")
a = F("a")

f.o = e
f.w = h
f.y = c
f.z = g
f.s = a
g.o = f
g.t = i
c.x = g
c.v = h
c.t = i
c.r = i
c.y = m
h.p = a
h.t = a
h.w = c
h.x = m
m.r = h
m.w = g
m.v = g
m.t = a
m.s = a
m.u = i
e.t = m
i.z = c
i.w = c
i.x = m
a.t = m
assert e.t.t.t.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: D = None
        self.y: C = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: E = None
        self.w: C = None
        self.txt = txt

f = A("f")
g = B("g")
c = C("c")
h = D("h")
m = E("m")
e = F("e")
i = G("i")
a = F("a")

f.o = e
f.w = h
f.y = c
f.z = g
f.s = a
g.o = f
g.t = i
c.x = g
c.v = h
c.t = i
c.r = i
c.y = m
h.p = a
h.t = a
h.w = c
h.x = m
m.r = h
m.w = g
m.v = g
m.t = a
m.s = a
m.u = i
e.t = m
i.z = c
i.w = c
i.x = m
a.t = m
assert e.t.t.t.u.x.txt == "m"