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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.z: F = None
        self.u: B = None
        self.r: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.v: E = None
        self.t: E = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: C = None
        self.r: J = None
        self.u: I = None
        self.w: I = None
        self.s: J = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.x: C = None
        self.y: A = None
        self.z: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.z: F = None
        self.u: B = None
        self.r: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.v: E = None
        self.t: E = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: C = None
        self.r: J = None
        self.u: I = None
        self.w: I = None
        self.s: J = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.x: C = None
        self.y: A = None
        self.z: J = None
        self.txt = txt

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

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

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