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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.u: B = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.u: B = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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