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

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

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

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

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