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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

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

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

d = A("d")
e = B("e")
n = C("n")
h = D("h")
c = E("c")
i = F("i")
f = G("f")
a = H("a")
b = I("b")
l = A("l")

d.y = c
d.u = c
d.o = a
d.p = e
d.z = i
e.t = a
e.z = n
n.p = d
n.q = a
n.w = f
n.x = i
n.y = e
n.u = c
n.s = h
h.s = a
h.u = f
c.r = f
c.x = i
c.o = n
i.r = b
f.y = b
f.p = e
f.v = h
f.r = h
f.t = h
f.z = h
f.w = l
f.x = c
f.u = n
a.w = i
a.o = b
a.t = d
a.y = e
a.r = e
a.q = h
a.z = h
a.x = l
a.u = f
b.s = n
b.w = d
b.q = h
l.y = c
l.u = c
l.o = a
l.p = e
l.z = i
assert d.o.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: H = None
        self.p: B = None
        self.u: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

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

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

d = A("d")
e = B("e")
n = C("n")
h = D("h")
c = E("c")
i = F("i")
f = G("f")
a = H("a")
b = I("b")
l = A("l")

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