class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.z: C = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: 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.w: B = None
        self.r: B = None
        self.v: A = None
        self.u: E = None
        self.q: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

b = A("b")
e = B("e")
a = C("a")
d = D("d")
k = E("k")
n = F("n")
j = G("j")
c = H("c")
m = H("m")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: 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.w: B = None
        self.r: B = None
        self.v: A = None
        self.u: E = None
        self.q: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

b = A("b")
e = B("e")
a = C("a")
d = D("d")
k = E("k")
n = F("n")
j = G("j")
c = H("c")
m = H("m")
h = B("h")

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