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

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

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

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

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

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

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

e = A("e")
l = B("l")
f = C("f")
h = D("h")
g = E("g")
k = F("k")
d = G("d")
a = E("a")

e.x = f
e.q = k
l.s = f
l.z = d
f.y = g
f.z = g
f.r = l
f.v = l
f.q = h
f.u = a
h.p = a
g.u = f
g.x = d
g.y = h
g.p = h
g.s = l
k.u = f
k.v = f
k.y = l
k.z = a
d.s = g
d.y = l
d.z = a
a.u = f
a.x = d
a.y = h
a.p = h
a.s = l
assert a.x.z.x.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

e = A("e")
l = B("l")
f = C("f")
h = D("h")
g = E("g")
k = F("k")
d = G("d")
a = E("a")

e.x = f
e.q = k
l.s = f
l.z = d
f.y = g
f.z = g
f.r = l
f.v = l
f.q = h
f.u = a
h.p = a
g.u = f
g.x = d
g.y = h
g.p = h
g.s = l
k.u = f
k.v = f
k.y = l
k.z = a
d.s = g
d.y = l
d.z = a
a.u = f
a.x = d
a.y = h
a.p = h
a.s = l
assert a.x.z.x.s.s.txt == "l"