class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: D = None
        self.q: I = None
        self.o: E = None
        self.v: D = None
        self.x: J = None
        self.u: G = None
        self.z: G = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: B = None
        self.o: H = None
        self.y: F = None
        self.u: I = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: E = None
        self.o: C = None
        self.x: B = None
        self.q: H = None
        self.t: I = None
        self.u: I = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: G = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: E = None
        self.z: C = None
        self.t: G = None
        self.v: F = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: D = None
        self.q: I = None
        self.o: E = None
        self.v: D = None
        self.x: J = None
        self.u: G = None
        self.z: G = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: B = None
        self.o: H = None
        self.y: F = None
        self.u: I = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: E = None
        self.o: C = None
        self.x: B = None
        self.q: H = None
        self.t: I = None
        self.u: I = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: G = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: E = None
        self.z: C = None
        self.t: G = None
        self.v: F = None
        self.w: G = None
        self.txt = txt

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

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