class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: G = None
        self.u: G = None
        self.s: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.o: D = None
        self.v: D = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.z: G = None
        self.s: B = None
        self.q: C = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

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

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

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

f = A("f")
n = B("n")
c = C("c")
m = D("m")
h = E("h")
j = F("j")
k = G("k")
e = C("e")
d = A("d")

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.o: D = None
        self.v: D = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.z: G = None
        self.s: B = None
        self.q: C = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

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

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

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

f = A("f")
n = B("n")
c = C("c")
m = D("m")
h = E("h")
j = F("j")
k = G("k")
e = C("e")
d = A("d")

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