class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: C = None
        self.r: A = None
        self.u: G = None
        self.w: F = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: F = None
        self.r: G = None
        self.o: B = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: F = None
        self.r: G = None
        self.o: B = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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