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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.t: H = None
        self.z: I = None
        self.s: C = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: D = None
        self.t: A = None
        self.o: I = None
        self.y: I = None
        self.w: B = None
        self.txt = txt

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

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

d = A("d")
i = B("i")
l = C("l")
h = D("h")
a = E("a")
g = F("g")
e = G("e")
m = H("m")
k = I("k")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.t: H = None
        self.z: I = None
        self.s: C = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: D = None
        self.t: A = None
        self.o: I = None
        self.y: I = None
        self.w: B = None
        self.txt = txt

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

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

d = A("d")
i = B("i")
l = C("l")
h = D("h")
a = E("a")
g = F("g")
e = G("e")
m = H("m")
k = I("k")

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