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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: I = None
        self.w: G = None
        self.r: I = None
        self.y: F = None
        self.s: I = None
        self.v: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: G = None
        self.w: A = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: G = None
        self.s: G = None
        self.t: G = None
        self.z: J = None
        self.y: H = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.s: I = None
        self.v: I = None
        self.u: G = None
        self.txt = txt

l = A("l")
d = B("d")
m = C("m")
j = D("j")
i = E("i")
f = F("f")
a = G("a")
n = H("n")
g = I("g")
b = J("b")

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: I = None
        self.w: G = None
        self.r: I = None
        self.y: F = None
        self.s: I = None
        self.v: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: G = None
        self.w: A = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: G = None
        self.s: G = None
        self.t: G = None
        self.z: J = None
        self.y: H = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.s: I = None
        self.v: I = None
        self.u: G = None
        self.txt = txt

l = A("l")
d = B("d")
m = C("m")
j = D("j")
i = E("i")
f = F("f")
a = G("a")
n = H("n")
g = I("g")
b = J("b")

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