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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: D = None
        self.o: A = None
        self.q: F = None
        self.z: C = None
        self.s: F = None
        self.v: A = None
        self.x: B = None
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.x: E = None
        self.v: E = None
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: D = None
        self.o: A = None
        self.q: F = None
        self.z: C = None
        self.s: F = None
        self.v: A = None
        self.x: B = None
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.x: E = None
        self.v: E = None
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

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