class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.s: E = None
        self.z: I = None
        self.w: H = None
        self.t: C = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: F = None
        self.q: F = None
        self.r: G = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: F = None
        self.q: F = None
        self.r: G = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

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

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