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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: E = None
        self.x: C = None
        self.y: F = None
        self.p: J = None
        self.v: F = None
        self.o: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.v: B = None
        self.x: J = None
        self.t: I = None
        self.s: H = None
        self.w: D = None
        self.z: I = None
        self.p: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: E = None
        self.x: C = None
        self.y: F = None
        self.p: J = None
        self.v: F = None
        self.o: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.v: B = None
        self.x: J = None
        self.t: I = None
        self.s: H = None
        self.w: D = None
        self.z: I = None
        self.p: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

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