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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: C = None
        self.o: I = None
        self.r: B = None
        self.w: H = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: C = None
        self.o: I = None
        self.r: B = None
        self.w: H = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

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