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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: J = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: H = None
        self.z: I = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

d = A("d")
l = B("l")
a = C("a")
j = D("j")
c = E("c")
f = F("f")
h = G("h")
b = H("b")
k = I("k")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: J = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: H = None
        self.z: I = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

d = A("d")
l = B("l")
a = C("a")
j = D("j")
c = E("c")
f = F("f")
h = G("h")
b = H("b")
k = I("k")
m = J("m")

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