class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: G = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

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

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

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