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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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