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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

g.p = c
g.o = b
b.t = g
b.z = g
b.r = g
b.p = e
c.v = b
l.t = g
l.v = d
e.t = c
j.s = h
j.q = h
j.o = e
j.y = e
j.v = b
j.p = l
d.t = n
h.s = j
h.q = j
h.o = d
h.v = b
h.y = e
h.p = a
n.v = b
a.t = g
a.v = e
assert e.t.v.r.p.v.p.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

g.p = c
g.o = b
b.t = g
b.z = g
b.r = g
b.p = e
c.v = b
l.t = g
l.v = d
e.t = c
j.s = h
j.q = h
j.o = e
j.y = e
j.v = b
j.p = l
d.t = n
h.s = j
h.q = j
h.o = d
h.v = b
h.y = e
h.p = a
n.v = b
a.t = g
a.v = e
assert e.t.v.r.p.v.p.t.v.txt == "b"