class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.r: D = None
        self.z: F = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.w: D = None
        self.p: B = None
        self.x: C = None
        self.v: C = 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.o: E = None
        self.z: C = None
        self.p: D = None
        self.y: E = None
        self.r: D = None
        self.v: A = None
        self.u: I = None
        self.t: E = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.w: D = None
        self.p: B = None
        self.x: C = None
        self.v: C = 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.o: E = None
        self.z: C = None
        self.p: D = None
        self.y: E = None
        self.r: D = None
        self.v: A = None
        self.u: I = None
        self.t: E = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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