class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: H = None
        self.z: G = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: I = None
        self.x: C = None
        self.w: E = None
        self.p: E = None
        self.r: G = None
        self.s: G = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: H = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: I = None
        self.x: C = None
        self.w: E = None
        self.p: E = None
        self.r: G = None
        self.s: G = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: H = None
        self.q: F = None
        self.txt = txt

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

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

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

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