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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: G = None
        self.s: D = None
        self.v: G = None
        self.y: D = None
        self.w: B = None
        self.z: J = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: I = None
        self.z: J = None
        self.p: D = None
        self.s: C = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.p: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: H = None
        self.u: G = None
        self.w: H = None
        self.r: H = None
        self.z: H = None
        self.s: B = None
        self.txt = txt

i = A("i")
f = B("f")
j = C("j")
c = D("c")
d = E("d")
l = F("l")
m = G("m")
b = H("b")
k = I("k")
g = J("g")

i.y = l
i.u = j
f.t = b
j.p = d
j.x = m
j.v = m
j.s = c
j.y = c
j.w = f
j.z = g
j.r = b
c.s = i
c.q = j
c.z = b
c.w = m
d.w = i
d.r = k
d.z = g
d.p = c
d.s = j
d.q = b
d.o = m
l.s = i
l.t = f
l.p = g
m.p = b
m.u = i
m.y = k
m.q = j
m.s = d
m.t = d
b.s = j
k.v = b
k.u = b
g.y = j
g.o = b
g.w = b
g.r = b
g.z = b
g.u = m
g.s = f
assert i.y.t.t.s.w.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: G = None
        self.s: D = None
        self.v: G = None
        self.y: D = None
        self.w: B = None
        self.z: J = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: I = None
        self.z: J = None
        self.p: D = None
        self.s: C = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.p: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: H = None
        self.u: G = None
        self.w: H = None
        self.r: H = None
        self.z: H = None
        self.s: B = None
        self.txt = txt

i = A("i")
f = B("f")
j = C("j")
c = D("c")
d = E("d")
l = F("l")
m = G("m")
b = H("b")
k = I("k")
g = J("g")

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