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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.v: A = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: E = None
        self.z: C = None
        self.v: C = None
        self.o: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.t: H = None
        self.u: F = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: I = None
        self.w: B = None
        self.t: C = None
        self.q: I = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.v: A = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: E = None
        self.z: C = None
        self.v: C = None
        self.o: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.t: H = None
        self.u: F = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: I = None
        self.w: B = None
        self.t: C = None
        self.q: I = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

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

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

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