class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.s: C = None
        self.o: B = None
        self.w: B = None
        self.r: E = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: F = None
        self.o: C = None
        self.r: A = None
        self.x: H = None
        self.v: D = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: A = None
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: F = None
        self.o: C = None
        self.r: A = None
        self.x: H = None
        self.v: D = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: A = None
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

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