class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: G = None
        self.q: C = None
        self.s: D = None
        self.o: H = None
        self.r: H = None
        self.z: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.o: I = None
        self.x: C = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.o: I = None
        self.x: C = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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