class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: A = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

h = A("h")
e = B("e")
a = C("a")
k = D("k")
g = E("g")
j = F("j")
b = F("b")
n = F("n")
f = B("f")
l = C("l")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: A = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

h = A("h")
e = B("e")
a = C("a")
k = D("k")
g = E("g")
j = F("j")
b = F("b")
n = F("n")
f = B("f")
l = C("l")

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