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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.x: C = None
        self.r: A = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

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

i = A("i")
g = B("g")
m = C("m")
j = D("j")
h = E("h")
n = F("n")
e = E("e")
k = F("k")
c = C("c")
l = B("l")

i.w = j
i.q = e
g.p = l
g.x = n
m.y = i
j.u = k
j.z = k
j.q = i
h.v = j
h.w = m
h.x = m
h.r = i
h.q = e
h.s = l
n.z = h
n.w = j
n.o = j
n.x = l
e.v = j
e.w = m
e.x = c
e.r = i
e.q = h
e.s = g
k.z = h
k.w = j
k.o = j
k.x = g
c.y = i
l.p = g
l.x = k
assert c.y.w.q.w.q.w.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.x: C = None
        self.r: A = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

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

i = A("i")
g = B("g")
m = C("m")
j = D("j")
h = E("h")
n = F("n")
e = E("e")
k = F("k")
c = C("c")
l = B("l")

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