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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.v: F = None
        self.p: B = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.v: F = None
        self.p: B = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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

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

f.q = k
f.y = l
f.r = n
n.q = m
n.w = a
k.z = g
k.p = g
k.w = l
g.x = m
g.z = a
g.y = k
h.x = l
h.o = n
h.p = n
h.v = b
h.t = b
h.q = k
b.o = k
b.r = k
b.q = f
b.t = j
l.y = m
j.o = k
j.r = k
j.q = f
j.t = b
a.q = m
a.w = n
m.x = l
m.o = n
m.v = b
m.t = b
m.p = a
m.q = k
assert f.q.w.y.x.y.p.q.t.t.txt == "j"