class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.r: C = None
        self.w: F = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.r: C = None
        self.y: D = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: B = None
        self.z: C = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

n = A("n")
l = B("l")
i = C("i")
m = D("m")
j = E("j")
d = F("d")
c = F("c")
a = A("a")
g = B("g")
f = F("f")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.r: C = None
        self.y: D = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: B = None
        self.z: C = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

n = A("n")
l = B("l")
i = C("i")
m = D("m")
j = E("j")
d = F("d")
c = F("c")
a = A("a")
g = B("g")
f = F("f")

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