class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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