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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.u: A = None
        self.p: E = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.z: G = None
        self.o: F = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.z: B = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

l = A("l")
m = B("m")
h = C("h")
i = D("i")
n = E("n")
c = F("c")
a = G("a")
j = C("j")
e = D("e")
d = C("d")

l.w = h
l.u = a
m.t = l
m.u = j
m.q = h
h.v = m
h.y = n
h.p = n
h.u = l
h.w = a
h.t = d
i.s = m
i.v = l
i.z = a
i.o = c
i.r = c
i.u = j
n.y = a
n.z = m
n.s = l
c.q = a
c.o = a
c.t = e
c.z = m
c.u = l
a.w = j
a.o = e
a.x = e
a.q = e
a.v = m
a.t = l
j.v = m
j.y = n
j.p = n
j.u = l
j.w = a
j.t = d
e.s = m
e.v = l
e.z = a
e.o = c
e.r = c
e.u = d
d.v = m
d.y = n
d.p = n
d.u = l
d.w = a
d.t = h
assert d.u.w.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.u: A = None
        self.p: E = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.z: G = None
        self.o: F = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.z: B = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

l = A("l")
m = B("m")
h = C("h")
i = D("i")
n = E("n")
c = F("c")
a = G("a")
j = C("j")
e = D("e")
d = C("d")

l.w = h
l.u = a
m.t = l
m.u = j
m.q = h
h.v = m
h.y = n
h.p = n
h.u = l
h.w = a
h.t = d
i.s = m
i.v = l
i.z = a
i.o = c
i.r = c
i.u = j
n.y = a
n.z = m
n.s = l
c.q = a
c.o = a
c.t = e
c.z = m
c.u = l
a.w = j
a.o = e
a.x = e
a.q = e
a.v = m
a.t = l
j.v = m
j.y = n
j.p = n
j.u = l
j.w = a
j.t = d
e.s = m
e.v = l
e.z = a
e.o = c
e.r = c
e.u = d
d.v = m
d.y = n
d.p = n
d.u = l
d.w = a
d.t = h
assert d.u.w.v.t.txt == "l"