class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.x: B = None
        self.z: B = None
        self.o: E = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.w: C = None
        self.p: E = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

g.r = m
g.z = m
g.w = n
h.u = a
h.w = c
h.q = b
h.v = b
h.z = f
h.p = g
a.q = b
a.v = c
n.u = h
n.x = h
n.t = a
n.z = c
n.o = l
n.s = j
l.v = c
l.o = c
l.w = a
l.p = b
l.t = b
l.s = h
j.p = h
j.w = a
j.t = b
j.s = l
b.v = h
b.s = h
b.o = c
b.w = a
b.p = l
b.t = l
c.u = a
c.w = h
c.q = l
c.v = l
c.z = j
c.p = m
m.r = g
m.z = g
m.w = n
f.p = c
f.w = a
f.t = b
f.s = l
assert l.s.u.v.p.w.s.t.w.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.x: B = None
        self.z: B = None
        self.o: E = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.w: C = None
        self.p: E = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

g.r = m
g.z = m
g.w = n
h.u = a
h.w = c
h.q = b
h.v = b
h.z = f
h.p = g
a.q = b
a.v = c
n.u = h
n.x = h
n.t = a
n.z = c
n.o = l
n.s = j
l.v = c
l.o = c
l.w = a
l.p = b
l.t = b
l.s = h
j.p = h
j.w = a
j.t = b
j.s = l
b.v = h
b.s = h
b.o = c
b.w = a
b.p = l
b.t = l
c.u = a
c.w = h
c.q = l
c.v = l
c.z = j
c.p = m
m.r = g
m.z = g
m.w = n
f.p = c
f.w = a
f.t = b
f.s = l
assert l.s.u.v.p.w.s.t.w.v.txt == "c"