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

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

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

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

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

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

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

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

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

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

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

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

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

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

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