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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.q: H = None
        self.y: B = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

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

a = A("a")
d = B("d")
l = C("l")
h = D("h")
g = E("g")
j = F("j")
k = G("k")
c = H("c")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.q: H = None
        self.y: B = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

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

a = A("a")
d = B("d")
l = C("l")
h = D("h")
g = E("g")
j = F("j")
k = G("k")
c = H("c")

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