class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.r: D = None
        self.v: F = None
        self.t: E = None
        self.s: B = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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

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

l.q = d
l.r = d
l.z = d
l.y = g
l.t = g
l.v = e
l.s = f
f.y = d
i.x = f
i.y = j
i.u = l
i.o = a
d.u = g
d.y = g
d.v = e
d.z = a
d.o = l
d.x = f
g.z = j
g.w = j
g.u = l
a.s = i
a.q = i
a.p = j
a.x = d
a.u = f
a.y = g
j.v = i
j.q = i
j.o = g
e.s = i
e.q = i
e.p = j
e.x = d
e.u = f
e.y = g
assert l.v.q.y.q.x.y.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.r: D = None
        self.v: F = None
        self.t: E = None
        self.s: B = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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

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

l.q = d
l.r = d
l.z = d
l.y = g
l.t = g
l.v = e
l.s = f
f.y = d
i.x = f
i.y = j
i.u = l
i.o = a
d.u = g
d.y = g
d.v = e
d.z = a
d.o = l
d.x = f
g.z = j
g.w = j
g.u = l
a.s = i
a.q = i
a.p = j
a.x = d
a.u = f
a.y = g
j.v = i
j.q = i
j.o = g
e.s = i
e.q = i
e.p = j
e.x = d
e.u = f
e.y = g
assert l.v.q.y.q.x.y.z.x.txt == "d"