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

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

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

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

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

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

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

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

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

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

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

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

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

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

b.v = a
b.q = l
b.t = h
b.s = m
g.z = l
g.v = a
g.r = a
i.w = g
i.o = m
i.p = a
n.u = c
n.w = i
a.v = e
a.p = g
a.o = h
c.o = i
c.v = n
c.z = n
c.y = b
l.v = a
l.q = b
l.t = g
l.s = m
h.z = b
h.v = a
h.r = a
e.w = g
e.o = c
e.p = a
m.o = e
m.v = n
m.z = n
m.y = b
assert g.v.p.z.q.t.v.o.txt == "h"