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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: C = None
        self.r: F = None
        self.w: G = None
        self.v: E = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: C = None
        self.r: F = None
        self.w: G = None
        self.v: E = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.txt = txt

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

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

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