class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: A = None
        self.v: G = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: H = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: G = None
        self.w: D = None
        self.r: G = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: A = None
        self.v: G = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: H = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: G = None
        self.w: D = None
        self.r: G = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

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

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