class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: E = None
        self.y: D = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: F = None
        self.x: C = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.t: A = None
        self.y: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.p: E = None
        self.s: B = None
        self.x: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: F = None
        self.x: C = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.t: A = None
        self.y: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.p: E = None
        self.s: B = None
        self.x: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

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