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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.y: J = None
        self.p: C = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.q: D = None
        self.u: A = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.y: J = None
        self.p: C = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.q: D = None
        self.u: A = None
        self.s: B = None
        self.txt = txt

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

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