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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: A = None
        self.v: D = None
        self.p: H = None
        self.s: B = None
        self.q: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: A = None
        self.v: D = None
        self.p: H = None
        self.s: B = None
        self.q: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.q: B = None
        self.txt = txt

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

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

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

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