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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.o: B = None
        self.x: I = None
        self.v: B = None
        self.t: D = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.o: G = None
        self.x: D = None
        self.r: A = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.o: B = None
        self.x: I = None
        self.v: B = None
        self.t: D = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.o: G = None
        self.x: D = None
        self.r: A = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

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