class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: C = None
        self.z: B = None
        self.x: G = None
        self.o: H = None
        self.r: H = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: D = None
        self.w: G = None
        self.r: B = None
        self.p: F = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.q: I = None
        self.x: F = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: G = None
        self.p: C = None
        self.t: D = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: D = None
        self.w: G = None
        self.r: B = None
        self.p: F = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.q: I = None
        self.x: F = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: G = None
        self.p: C = None
        self.t: D = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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