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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.txt = txt

h = A("h")
n = B("n")
l = C("l")
d = D("d")
g = E("g")
a = F("a")
j = G("j")
m = H("m")
c = I("c")

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.txt = txt

h = A("h")
n = B("n")
l = C("l")
d = D("d")
g = E("g")
a = F("a")
j = G("j")
m = H("m")
c = I("c")

h.p = c
h.q = c
h.o = j
h.z = j
h.s = n
h.w = l
h.r = m
h.y = d
n.v = l
l.r = j
l.u = n
l.x = n
l.o = h
l.p = m
l.t = d
l.q = d
d.z = a
d.s = m
g.s = d
g.x = l
g.u = h
g.w = h
a.v = c
j.s = c
j.u = c
j.t = c
j.q = c
j.w = g
j.z = d
j.r = d
j.v = n
m.y = l
m.z = l
c.w = m
c.y = l
assert g.w.y.s.txt == "m"