class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.z: E = None
        self.x: C = None
        self.r: C = None
        self.o: E = None
        self.p: F = None
        self.t: I = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: H = None
        self.v: G = None
        self.w: H = None
        self.q: C = None
        self.r: A = None
        self.x: H = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.x: F = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.p: C = None
        self.x: H = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: D = None
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: H = None
        self.v: G = None
        self.w: H = None
        self.q: C = None
        self.r: A = None
        self.x: H = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.x: F = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.p: C = None
        self.x: H = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: D = None
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

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