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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.t: H = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: C = None
        self.r: I = None
        self.p: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: D = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.r: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.t: H = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: C = None
        self.r: I = None
        self.p: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: D = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.r: G = None
        self.w: B = None
        self.txt = txt

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

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

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