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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: E = None
        self.w: C = None
        self.t: C = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: G = None
        self.z: H = None
        self.s: H = None
        self.t: H = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.u: E = None
        self.o: F = None
        self.x: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: E = None
        self.w: C = None
        self.t: C = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: G = None
        self.z: H = None
        self.s: H = None
        self.t: H = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.u: E = None
        self.o: F = None
        self.x: F = None
        self.s: A = None
        self.txt = txt

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

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