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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

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

l.q = j
l.o = d
l.s = k
l.w = k
l.y = b
l.v = g
l.x = e
e.v = j
e.t = m
e.z = k
a.t = j
a.z = n
g.y = d
m.x = b
m.y = l
k.x = l
b.y = a
b.s = a
b.w = a
n.x = b
n.y = l
d.v = j
d.t = n
d.z = k
j.t = a
j.z = n
assert g.y.z.x.x.t.x.y.t.t.txt == "a"