class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.r: G = None
        self.x: I = None
        self.q: H = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.z: C = None
        self.w: C = None
        self.x: I = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: H = None
        self.x: F = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: J = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.o: H = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.z: C = None
        self.w: C = None
        self.x: I = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: H = None
        self.x: F = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: J = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.o: H = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

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

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