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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.w: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: D = None
        self.p: E = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.w: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: D = None
        self.p: E = None
        self.q: B = None
        self.txt = txt

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

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