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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.t: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.u: F = None
        self.t: B = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.v: B = None
        self.q: B = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.t: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.u: F = None
        self.t: B = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.v: B = None
        self.q: B = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

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

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

a.p = e
a.o = n
c.z = d
c.v = d
c.t = a
c.q = e
i.y = c
i.t = c
i.w = a
i.o = a
i.u = b
i.v = b
e.s = a
e.w = b
e.v = j
e.q = j
e.x = i
e.t = i
d.u = c
d.y = j
d.r = n
d.x = b
n.y = c
n.t = i
n.u = b
n.w = j
j.z = d
j.v = d
j.t = a
j.q = e
b.y = j
b.t = i
b.u = n
b.w = c
assert e.q.t.p.w.w.t.p.txt == "e"