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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: D = None
        self.t: D = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.u: B = None
        self.s: D = None
        self.t: H = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.t: B = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: D = None
        self.t: D = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.u: B = None
        self.s: D = None
        self.t: H = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.t: B = None
        self.w: G = None
        self.txt = txt

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

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