class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: H = None
        self.z: H = None
        self.y: D = None
        self.t: H = None
        self.w: D = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: F = None
        self.w: I = None
        self.z: D = None
        self.t: I = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.z: F = None
        self.y: H = None
        self.q: F = None
        self.r: I = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.s: I = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: H = None
        self.z: H = None
        self.y: D = None
        self.t: H = None
        self.w: D = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: F = None
        self.w: I = None
        self.z: D = None
        self.t: I = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.z: F = None
        self.y: H = None
        self.q: F = None
        self.r: I = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.s: I = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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