class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: G = None
        self.o: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: B = None
        self.t: G = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.x: H = None
        self.p: F = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.s: F = None
        self.x: A = None
        self.z: A = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: B = None
        self.t: G = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.x: H = None
        self.p: F = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.s: F = None
        self.x: A = None
        self.z: A = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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