class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: D = None
        self.s: B = None
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.z: H = None
        self.p: C = None
        self.y: B = None
        self.o: D = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.v: H = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.z: H = None
        self.p: C = None
        self.y: B = None
        self.o: D = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.v: H = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: A = None
        self.txt = txt

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

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

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