class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: H = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: H = None
        self.w: G = None
        self.v: B = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.s: A = None
        self.v: E = None
        self.q: I = None
        self.r: B = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.o: D = None
        self.p: H = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.x: H = None
        self.r: B = None
        self.v: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: H = None
        self.w: G = None
        self.v: B = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.s: A = None
        self.v: E = None
        self.q: I = None
        self.r: B = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.o: D = None
        self.p: H = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.x: H = None
        self.r: B = None
        self.v: G = None
        self.txt = txt

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

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