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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: I = None
        self.z: B = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: I = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: I = None
        self.z: B = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: I = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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