class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.x: E = None
        self.q: D = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: F = None
        self.t: A = None
        self.z: F = None
        self.r: B = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.s: C = None
        self.z: C = None
        self.o: C = None
        self.u: A = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

k = A("k")
e = B("e")
j = C("j")
c = D("c")
f = E("f")
g = F("g")
a = G("a")
m = H("m")
d = B("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: F = None
        self.t: A = None
        self.z: F = None
        self.r: B = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.s: C = None
        self.z: C = None
        self.o: C = None
        self.u: A = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

k = A("k")
e = B("e")
j = C("j")
c = D("c")
f = E("f")
g = F("g")
a = G("a")
m = H("m")
d = B("d")

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