class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.q: I = None
        self.t: D = None
        self.s: D = None
        self.x: F = None
        self.z: D = None
        self.v: D = None
        self.p: F = None
        self.u: J = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.x: D = None
        self.o: G = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.x: D = None
        self.o: G = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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