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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: G = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.t: I = None
        self.u: A = None
        self.y: G = None
        self.o: F = None
        self.q: F = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: J = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.w: D = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: G = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.t: I = None
        self.u: A = None
        self.y: G = None
        self.o: F = None
        self.q: F = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: J = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.w: D = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

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

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