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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: A = None
        self.w: E = None
        self.s: H = None
        self.p: E = None
        self.u: E = None
        self.z: E = None
        self.r: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: A = None
        self.u: F = None
        self.x: H = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.p: A = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: C = None
        self.z: D = None
        self.t: I = None
        self.w: F = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: A = None
        self.w: E = None
        self.s: H = None
        self.p: E = None
        self.u: E = None
        self.z: E = None
        self.r: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: A = None
        self.u: F = None
        self.x: H = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.p: A = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: C = None
        self.z: D = None
        self.t: I = None
        self.w: F = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.txt = txt

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

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

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