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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.t: A = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.t: A = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: A = None
        self.txt = txt

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

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

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