class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.x: C = None
        self.u: H = None
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.w: E = None
        self.x: A = None
        self.y: F = None
        self.u: C = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.x: C = None
        self.u: H = None
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.w: E = None
        self.x: A = None
        self.y: F = None
        self.u: C = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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