class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: F = None
        self.t: G = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.v: H = None
        self.z: H = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: G = None
        self.x: D = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.r: E = None
        self.u: B = None
        self.v: F = None
        self.t: F = None
        self.y: D = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.v: H = None
        self.z: H = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: G = None
        self.x: D = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.r: E = None
        self.u: B = None
        self.v: F = None
        self.t: F = None
        self.y: D = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: A = None
        self.txt = txt

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

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