class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: C = None
        self.x: D = None
        self.u: A = None
        self.s: I = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.q: B = None
        self.v: H = None
        self.t: B = None
        self.z: I = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: C = None
        self.x: D = None
        self.u: A = None
        self.s: I = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.q: B = None
        self.v: H = None
        self.t: B = None
        self.z: I = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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