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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: J = None
        self.r: J = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.w: G = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.q: A = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

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

k.o = i
k.r = i
k.p = b
k.x = a
k.w = a
k.u = l
k.z = f
k.y = h
h.t = l
l.y = b
l.u = f
l.r = f
l.v = k
l.o = e
e.p = k
e.t = i
e.w = d
e.v = b
e.r = a
a.y = l
a.u = m
a.o = k
a.x = k
a.z = e
a.p = e
i.x = d
d.u = i
d.r = m
d.y = e
m.p = e
m.o = d
m.q = k
m.t = h
m.y = l
b.y = a
b.q = k
b.z = e
f.w = i
f.v = m
f.q = e
assert d.u.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: I = None
        self.x: E = None
        self.u: C = None
        self.w: E = None
        self.r: F = None
        self.z: J = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: J = None
        self.r: J = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.w: G = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.q: A = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

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

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