class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.u: G = None
        self.w: F = None
        self.s: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.t: E = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

c = A("c")
k = B("k")
m = C("m")
i = D("i")
g = E("g")
b = F("b")
h = G("h")
n = G("n")
e = B("e")
j = F("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.t: E = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

c = A("c")
k = B("k")
m = C("m")
i = D("i")
g = E("g")
b = F("b")
h = G("h")
n = G("n")
e = B("e")
j = F("j")

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