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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.r: A = None
        self.x: H = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: A = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.r: A = None
        self.x: H = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: A = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

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

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