class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: I = None
        self.p: I = None
        self.w: J = None
        self.y: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.x: F = None
        self.s: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: B = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.x: F = None
        self.s: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: B = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

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

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