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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: C = None
        self.y: A = None
        self.r: F = None
        self.s: A = None
        self.z: A = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: E = None
        self.s: D = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: C = None
        self.y: A = None
        self.r: F = None
        self.s: A = None
        self.z: A = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: E = None
        self.s: D = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.w: H = None
        self.txt = txt

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

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

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