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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: C = None
        self.v: A = None
        self.y: D = None
        self.r: F = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: C = None
        self.v: A = None
        self.y: D = None
        self.r: F = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

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

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

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