class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

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

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

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