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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.u: F = None
        self.z: G = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.txt = txt

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

m = A("m")
l = B("l")
g = C("g")
a = D("a")
f = E("f")
j = F("j")
n = G("n")
h = H("h")
k = B("k")

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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.u: F = None
        self.z: G = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.txt = txt

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

m = A("m")
l = B("l")
g = C("g")
a = D("a")
f = E("f")
j = F("j")
n = G("n")
h = H("h")
k = B("k")

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