class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: J = None
        self.r: H = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.q: B = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: E = None
        self.p: A = None
        self.o: A = None
        self.y: G = None
        self.q: C = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.q: B = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: E = None
        self.p: A = None
        self.o: A = None
        self.y: G = None
        self.q: C = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: E = None
        self.txt = txt

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

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