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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.z: G = None
        self.u: C = None
        self.q: E = None
        self.v: F = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.u: C = None
        self.q: E = None
        self.y: G = None
        self.v: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: E = None
        self.x: H = None
        self.t: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.z: G = None
        self.u: C = None
        self.q: E = None
        self.v: F = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.u: C = None
        self.q: E = None
        self.y: G = None
        self.v: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: E = None
        self.x: H = None
        self.t: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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