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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: F = None
        self.s: E = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: F = None
        self.s: E = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

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

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