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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.o: E = None
        self.z: D = None
        self.r: D = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: A = None
        self.t: A = None
        self.p: F = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.s: G = None
        self.x: I = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

j = A("j")
a = B("a")
l = C("l")
c = D("c")
i = E("i")
e = F("e")
f = G("f")
h = H("h")
n = I("n")

j.q = i
a.s = j
a.y = c
a.z = c
a.r = c
a.o = i
a.t = i
a.v = l
l.o = e
l.p = e
l.s = j
l.t = j
l.w = a
l.v = f
c.u = h
c.q = h
c.w = f
c.y = f
c.s = f
c.x = n
c.t = n
c.r = n
c.o = l
i.o = l
e.u = j
e.z = h
f.s = j
f.v = n
f.q = h
f.t = i
f.w = l
f.z = e
f.r = a
h.u = f
h.s = f
h.r = c
h.y = c
h.x = n
h.t = j
n.w = l
assert j.q.o.o.u.q.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.o: E = None
        self.z: D = None
        self.r: D = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: A = None
        self.t: A = None
        self.p: F = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.s: G = None
        self.x: I = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

j = A("j")
a = B("a")
l = C("l")
c = D("c")
i = E("i")
e = F("e")
f = G("f")
h = H("h")
n = I("n")

j.q = i
a.s = j
a.y = c
a.z = c
a.r = c
a.o = i
a.t = i
a.v = l
l.o = e
l.p = e
l.s = j
l.t = j
l.w = a
l.v = f
c.u = h
c.q = h
c.w = f
c.y = f
c.s = f
c.x = n
c.t = n
c.r = n
c.o = l
i.o = l
e.u = j
e.z = h
f.s = j
f.v = n
f.q = h
f.t = i
f.w = l
f.z = e
f.r = a
h.u = f
h.s = f
h.r = c
h.y = c
h.x = n
h.t = j
n.w = l
assert j.q.o.o.u.q.o.w.txt == "a"