class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.u: D = None
        self.z: B = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.u: D = None
        self.z: B = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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