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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.x: G = None
        self.s: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.r: A = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: G = None
        self.w: D = None
        self.p: A = None
        self.y: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.x: G = None
        self.s: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.r: A = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: G = None
        self.w: D = None
        self.p: A = None
        self.y: D = None
        self.z: E = None
        self.txt = txt

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

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

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