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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: A = None
        self.w: F = None
        self.o: D = None
        self.y: D = None
        self.s: B = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.w: F = None
        self.o: E = None
        self.u: A = None
        self.z: H = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.v: F = None
        self.q: C = None
        self.t: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: A = None
        self.w: F = None
        self.o: D = None
        self.y: D = None
        self.s: B = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.w: F = None
        self.o: E = None
        self.u: A = None
        self.z: H = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.v: F = None
        self.q: C = None
        self.t: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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