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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: F = None
        self.t: C = None
        self.x: E = None
        self.r: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

b.v = k
b.z = k
b.p = i
b.y = i
b.t = j
i.p = e
k.x = i
k.t = i
k.u = j
j.u = h
j.z = e
j.r = e
j.v = e
j.t = k
j.x = c
g.w = j
e.v = k
e.u = b
e.o = c
a.o = b
a.t = d
h.o = b
h.t = d
d.u = h
d.z = e
d.r = e
d.v = e
d.t = k
d.x = c
c.w = d
assert h.o.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.p: B = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: F = None
        self.t: C = None
        self.x: E = None
        self.r: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

b.v = k
b.z = k
b.p = i
b.y = i
b.t = j
i.p = e
k.x = i
k.t = i
k.u = j
j.u = h
j.z = e
j.r = e
j.v = e
j.t = k
j.x = c
g.w = j
e.v = k
e.u = b
e.o = c
a.o = b
a.t = d
h.o = b
h.t = d
d.u = h
d.z = e
d.r = e
d.v = e
d.t = k
d.x = c
c.w = d
assert h.o.t.r.txt == "e"