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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: I = None
        self.x: A = None
        self.p: E = None
        self.u: I = None
        self.o: G = None
        self.q: G = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.q: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: I = None
        self.x: A = None
        self.p: E = None
        self.u: I = None
        self.o: G = None
        self.q: G = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.q: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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