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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.q: F = None
        self.r: D = None
        self.s: F = None
        self.txt = txt

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

g = A("g")
m = B("m")
i = C("i")
c = D("c")
b = E("b")
h = F("h")
e = B("e")
k = A("k")
j = D("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.q: F = None
        self.r: D = None
        self.s: F = None
        self.txt = txt

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

g = A("g")
m = B("m")
i = C("i")
c = D("c")
b = E("b")
h = F("h")
e = B("e")
k = A("k")
j = D("j")

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