class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: E = None
        self.x: G = None
        self.q: C = None
        self.s: I = None
        self.v: F = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: E = None
        self.z: H = None
        self.r: H = None
        self.q: I = None
        self.y: F = None
        self.o: C = None
        self.u: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.p: A = None
        self.u: G = None
        self.q: A = None
        self.x: H = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.o: G = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.v: C = None
        self.u: H = None
        self.txt = txt

h = A("h")
b = B("b")
g = C("g")
a = D("a")
c = E("c")
j = F("j")
n = G("n")
i = H("i")
l = I("l")
k = A("k")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: E = None
        self.z: H = None
        self.r: H = None
        self.q: I = None
        self.y: F = None
        self.o: C = None
        self.u: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.p: A = None
        self.u: G = None
        self.q: A = None
        self.x: H = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.o: G = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.v: C = None
        self.u: H = None
        self.txt = txt

h = A("h")
b = B("b")
g = C("g")
a = D("a")
c = E("c")
j = F("j")
n = G("n")
i = H("i")
l = I("l")
k = A("k")

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