class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.u: E = None
        self.t: A = None
        self.s: B = None
        self.o: G = None
        self.r: G = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: F = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: E = None
        self.s: F = None
        self.p: H = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: F = None
        self.w: G = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: G = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.u: E = None
        self.t: A = None
        self.s: B = None
        self.o: G = None
        self.r: G = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: F = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: E = None
        self.s: F = None
        self.p: H = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: F = None
        self.w: G = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: G = None
        self.u: B = None
        self.txt = txt

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

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

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