class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.y: F = None
        self.q: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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